package net.liuwenwen;

import org.jetbrains.annotations.Contract;

public class Car {
    private String ownerName;
    private float currentSpeed;
    private float currentSteeringAngle;

    private Car(String ownerName) {
        this.ownerName = ownerName;
    }

    public Car(String ownerName, float currentSpeed, float currentSteeringAngle) {
        this(ownerName);
        this.currentSpeed = currentSpeed;
        this.currentSteeringAngle = currentSteeringAngle;
    }

    public String getOwnerName() {
        return ownerName;
    }

    public float getCurrentSpeed() {
        return currentSpeed;
    }

    public float getCurrentSteeringAngle() {
        return currentSteeringAngle;
    }

    public void setCurrentSpeed(float CurrentSpeed) {
        this.currentSpeed = CurrentSpeed;
    }

    public void setCurrentSteeringAngle(float currentSteeringAngle) {
        this.currentSteeringAngle = currentSteeringAngle;
    }

    public void stopCar() {
        this.currentSpeed = 0;
    }
}
